package com.hzbank.juc.introduction;

import lombok.extern.slf4j.Slf4j;

import java.sql.Time;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.LockSupport;

/**
 * @description:
 * @author: libugu@cskaoyan.com
 * @date 2023/12/19 - 9:44
 */
@Slf4j
public class Park {
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            log.debug("park...");
            LockSupport.park();
            log.debug("unpark...");
            log.debug("打断状态：{}", Thread.currentThread().isInterrupted());
        }, "t1");
        t1.start();
//        TimeUnit.SECONDS.sleep(1);
//        t1.interrupt();
    }

}
